from urllib.parse import urlparse

o = urlparse("https://www.runoob.com/?s=python+test")
print(o)